package comtwo;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

public class Demo3 {
    public static void main(String[] args) {
        Set set = new HashSet();
        //添加
        set.add(1);
        //修改 xx
        //set.add(2);
        //删
        //set.remove(1);
        //查

        /*
        Iterator iterator = set.iterator();
        while (iterator.hasNext()){
            System.out.println(iterator.next().toString());
        }*/
        //增强型for循环
        for (Object object:set) {
            System.out.println(object.toString());
        }

    }
}
